package cn.s1995.sloth.bizs.mapper;

import cn.s1995.sloth.common.data.datascope.SlothBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import cn.s1995.sloth.bizs.entity.VideoComment;
import cn.s1995.sloth.bizs.oo.req.VideoCommentREQ;

@Mapper
public interface VideoCommentMapper extends SlothBaseMapper<VideoComment> {

	@Update("UPDATE biz_video_comment SET like_count = like_count + (#{changeCount}) WHERE id = #{id}")
	void updateLikeCount(@Param("id") Long id,@Param("changeCount")  Integer changeCount);

	Page selectCommentPage(@Param("page") Page page, @Param("req") VideoCommentREQ req);
}
